Skip to content

refactor(global-cli): drop redundant clippy allow attributes - #2235

Open
shulaoda wants to merge 2 commits into
mainfrom
07-24-refactor_global-cli_drop_redundant_clippy_allow_attributes
Open

refactor(global-cli): drop redundant clippy allow attributes#2235
shulaoda wants to merge 2 commits into
mainfrom
07-24-refactor_global-cli_drop_redundant_clippy_allow_attributes

Conversation

@shulaoda

Copy link
Copy Markdown
Member

Problem

crates/vite_global_cli/src/shim/dispatch.rs had six function-level clippy #[allow(...)] attributes (on get_npm_global_prefix, check_npm_global_install_result, dedup_missing_bins, remove_npm_global_uninstall_links, read_npm_package_json, collect_bin_names_from_npm), all suppressing clippy::disallowed_types and/or clippy::disallowed_macros.

But main.rs already suppresses those lints for the whole crate:

#![allow(
    clippy::allow_attributes,
    clippy::disallowed_macros,
    clippy::disallowed_methods,
    clippy::disallowed_types,
    clippy::print_stderr,
    clippy::print_stdout
)]

A crate-level inner #![allow(...)] propagates to all descendant modules (dispatch.rs is one), so the per-fn attributes are dead. They lingered because clippy::allow_attributes — the lint that would flag a redundant #[allow] — is itself crate-allowed.

@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit d344912
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a6cdc2efd65eb00087e852c

@github-actions

Copy link
Copy Markdown
Contributor

Native binary sizes (d344912)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.

Artifact Format Base PR Change
vp (Linux x64) Binary 10.31 MiB 10.31 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.43 MiB 4.43 MiB +2 B (+0.00%)
NAPI (Linux x64) Binary 33.08 MiB 33.08 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 12.72 MiB 12.72 MiB 0 B (0.00%)
vp (macOS ARM64) Binary 7.64 MiB 7.64 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 3.84 MiB 3.84 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 40.50 MiB 40.50 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 16.97 MiB 16.97 MiB -1 B (-0.00%)
vp (Windows x64) Binary 8.35 MiB 8.35 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 3.63 MiB 3.63 MiB +8 B (+0.00%)
NAPI (Windows x64) Binary 27.52 MiB 27.52 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 10.70 MiB 10.70 MiB 0 B (0.00%)
Trampoline (Windows x64) Binary 203.00 KiB 203.00 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 97.91 KiB 97.91 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.44 MiB 4.44 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.08 MiB 2.08 MiB +1 B (+0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant